import { defineNuxtPlugin } from "nuxt/app";
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { ZINDEX_INJECTION_KEY, ID_INJECTION_KEY } from 'element-plus';



export default defineNuxtPlugin((nuxtApp) => {
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        nuxtApp.vueApp.component(key, component)
    }
    nuxtApp.vueApp.use(ElementPlus);
    nuxtApp.vueApp.provide(ZINDEX_INJECTION_KEY,{
        prefix: 100,
        current: 0,
    })
    nuxtApp.vueApp.provide(ID_INJECTION_KEY,{
        prefix: 100,
        current: 0,
    })
})